#pragma once

#include <gtl/xml/xml.h>
#include <gtl/ui/skins/pane.h>

namespace gtl
{

namespace skins
{

class popup
	: public wnd
{
public:
	popup();
	virtual ~popup();

public:
	virtual unsigned int initialize(gtl::xml& node, wnd* parent_wnd);

protected:
	void GetRect(CRect& rect, gtl::xml& node);

protected:
	DECLARE_MESSAGE_MAP()
	afx_msg LRESULT OnNcHitTest(CPoint point);
	afx_msg LRESULT OnWindowEvent(WPARAM wParam, LPARAM lParam);

protected:
	HWINEVENTHOOK m_hEventHook;
	std::vector<CRect> m_hittest_rects;
};

} // end of namespace skins

} // end of namespace gtl